package com.Lgwd.repository;

import com.Lgwd.entity.UserEntiy;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface UserRepository extends JpaRepository<UserEntiy,Integer> {



    @Query(value="select * FROM `user` where user_account=?1 and user_pwd=?2" , nativeQuery = true)
    UserEntiy findByUser_accountAnduser_AndUser_pwd(@Param("user_account")String userAccount,@Param("user_pwd") String userPwd );


    @Query(value="select * FROM `user` where user_account=?1" , nativeQuery = true)
    UserEntiy findByUser_account(@Param("user_account")String user_account);
}
